package cn.cqie.attendance.manager.controller;

import cn.cqie.attendance.common.util.Page;
import cn.cqie.attendance.common.util.PageBean;
import cn.cqie.attendance.manager.pojo.AdminAttendance;
import cn.cqie.attendance.manager.pojo.AdminAttendancePunchSerch;
import cn.cqie.attendance.manager.pojo.AdminAttendanceSerch;
import cn.cqie.attendance.manager.service.AdminAttendanceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 697
 * @date 2021/7/8 10:47
 */
@RestController
@Api(tags = "管理员端-考勤管理模块")
@RequestMapping("/admin/attendance")
public class AdminAttendanceController {
    @Autowired
    private AdminAttendanceService adminAttendanceService;

    /**
     * 查询所有考勤记录 可组合模糊查询
     * @param adminAttendanceSerch
     * @param pageSize 每页的数量
     * @param pageNum 当前页
     * @return
     */
    @GetMapping("/queryAllStudentAttendanceInfo")
    @ApiOperation("查询所有考勤记录 可组合模糊查询")
    public PageBean queryAllStudentAttendanceInfo(AdminAttendanceSerch adminAttendanceSerch, Integer pageSize, Integer pageNum){
        return adminAttendanceService.queryAllStudentAttendanceInfo(adminAttendanceSerch,pageSize,pageNum);
    }


    /**
     * 查询所有门禁打卡记录 可组合模糊查询
     * @param adminAttendancePunchSerch
     * @param pageSize 每页的数量
     * @param pageNum 当前页
     * @return
     */
    @GetMapping("/queryAllPunchInfo")
    @ApiOperation("查询所有门禁打卡记录 可组合模糊查询")
    public PageBean queryAllPunchInfo(AdminAttendancePunchSerch adminAttendancePunchSerch,Integer pageSize,Integer pageNum){
        return adminAttendanceService.queryAllPunchInfo(adminAttendancePunchSerch,pageSize,pageNum);
    }
}
